<template>
	<view class="sale-num-edit">
		<view @click="dec" class="cut" v-if="value>0">
			-
		</view>
		<view class="input"  v-if="value>0">
		
			<input :value="value" disabled="disabled" type="number" class="inp" />
		</view>
		<view @click="add" class="add">
			+
		</view>
	</view>
</template>

<script>
	export default {
		methods:{
			add(){
				this.$emit("add",this.sk)
			},
			dec(){
				this.$emit("dec",this.sk)
			}
		},
		props:{
			value:Number,
			sk:null
		},
		computed:{
			
		},
		data() {
			return {
			};
		}
	}
</script>

<style lang="stylus">
	.sale-num-edit
		display flex
		align-items center
		.input
			z-index  0
			width:51upx;
			height:40upx;
			color #4E3E08
			font-size:27upx;
			line-height 43upx
			text-align center
			border-left  none
			border-right none
		.cut,.add
			width:40upx;
			height:40upx;
			background-color #335B67
			color white
			font-size 23upx
			line-height 40upx
			text-align center
			border-radius 50%
		.cut
			background-color white
			border 1px solid #335B67
			color #335B67
				
			
		
</style>
